﻿

using IotContract.Dtos.Servers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IotContract.Interfaces;
public interface IEquipManager
{
    /// <summary>
    /// 协议类型
    /// </summary>
    public string ProtobufType { get; set; }
    /// <summary>
    /// 是否拥有点位
    /// </summary>
    public bool HasTags { get; set; }












    /// <summary>
    /// 启动设备
    /// </summary>
    /// <param name="equips"></param>
    /// <returns></returns>
    Task<bool> Run(List<IotEquipDto> equips);

    /// <summary>
    /// 启动单个设备
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<bool> Run(IotEquipDto equip);
    /// <summary>
    /// 停止所有设备
    /// </summary>
    /// <returns></returns>
    Task<bool> Stop();

    /// <summary>
    /// 停止相关设备
    /// </summary>
    /// <param name="equips"></param>
    /// <returns></returns>
    Task<bool> Stop(List<long> equips);
    /// <summary>
    /// 停止该程序的所有设备
    /// </summary>
    /// <param name="programId"></param>
    /// <returns></returns>
    Task<bool> StopProgram(long programId);
    /// <summary>
    /// 清理离线的设备
    /// </summary>
    /// <param name="programId"></param>
    /// <returns></returns>
    Task<bool> ClearOffline(long programId);



    /// <summary>
    /// 推送和拉取
    /// </summary>
    /// <returns></returns>

    Task<bool> PushAndWriteEquips();
}
